package request

// GetSecurityEventsRequest 获取安全事件列表请求
type GetSecurityEventsRequest struct {
	StartDate string `json:"start_date" form:"start_date" binding:"required" example:"2024-01-01"`
	EndDate   string `json:"end_date" form:"end_date" binding:"required" example:"2024-01-31"`
	EventType string `json:"event_type" form:"event_type" binding:"omitempty"` // login, withdrawal, transfer, unusual
	Status    string `json:"status" form:"status" binding:"omitempty"`         // pending, handled, ignored
	Severity  string `json:"severity" form:"severity" binding:"omitempty"`     // low, medium, high, critical
	UserID    int    `json:"user_id" form:"user_id" binding:"omitempty" example:"10001"`
	Page      int    `json:"page" form:"page" binding:"omitempty,min=1" example:"1"`
	PageSize  int    `json:"page_size" form:"page_size" binding:"omitempty,min=1,max=100" example:"20"`
}

// GetSecurityEventRequest 获取单个安全事件详情请求
type GetSecurityEventRequest struct {
	EventId int64 `json:"event_id" form:"event_id" binding:"required,min=1" example:"1"`
}

// HandleSecurityEventRequest 处理安全事件请求
type HandleSecurityEventRequest struct {
	EventId     int64  `json:"event_id" form:"event_id" binding:"required,min=1" example:"1"`
	Action      string `json:"action" binding:"required" example:"block"` // block, allow, review, ignore
	HandlerID   string `json:"handler_id" binding:"required" example:"admin001"`
	HandlerName string `json:"handler_name" binding:"required" example:"管理员"`
	Notes       string `json:"notes" binding:"omitempty" example:"已确认安全风险，执行拦截操作"`
}

// GetSecuritySettingsRequest 获取安全设置请求
type GetSecuritySettingsRequest struct {
	UserId int64 `json:"user_id" form:"user_id" binding:"required,min=1"`
}

// UpdateSecuritySettingsRequest 更新安全设置请求
type UpdateSecuritySettingsRequest struct {
}

// GetSecurityStatusRequest 获取安全状态概览请求
type GetSecurityStatusRequest struct {
	TimeRange string `json:"time_range" form:"time_range" binding:"omitempty" example:"24h"` // 24h, 7d, 30d
}

// GetUserSecurityInfoRequest 获取用户安全信息请求
type GetUserSecurityInfoRequest struct {
	UserID int64 `uri:"user_id" binding:"required" example:"10001"`
}

// GetRiskUsersRequest 获取风险用户列表请求
type GetRiskUsersRequest struct {
	RiskLevel string `json:"risk_level" form:"risk_level" binding:"omitempty"` // low, medium, high, critical
	StartDate string `json:"start_date" form:"start_date" binding:"required" example:"2024-01-01"`
	EndDate   string `json:"end_date" form:"end_date" binding:"required" example:"2024-01-31"`
	Reason    string `json:"reason" form:"reason" binding:"omitempty"`
	Page      int    `json:"page" form:"page" binding:"omitempty,min=1" example:"1"`
	PageSize  int    `json:"page_size" form:"page_size" binding:"omitempty,min=1,max=100" example:"20"`
}
